package com.cms.acase.lazyload

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.fragment.app.FragmentPagerAdapter

class LazyLoadPageFragmentAdapter(
    activity: FragmentActivity,
    list: List<Fragment>,
    val tabs: List<String>
): FragmentPagerAdapter(activity.supportFragmentManager) {
    private val data:List<Fragment> = list


    override fun getCount(): Int {
        return  data.size
    }

    override fun getItem(position: Int): Fragment {
        return  data[position]
    }

    override fun getPageTitle(position: Int): CharSequence? {
     return tabs[position]
    }

}